DXL script prematurely ends

Hello people,

we're using DXL to import quite large amounts of data from structured text files to the DOORS. We'd prefer to run the script on a headless client, ideally at scheduled times. When the script was finally bug-free (or so we thought), I discovered it stops too soon. So the common solution was to add the "pragma runLim, 0" line to the beginning, but the problem was not overcome. Without the runLim pragma, the batch client displays a logical warning "-I- DXL: execution halted". But when I add the pragma, no such message appears anymore (it appears to be still running), yet the script never finishes its job. It's all visible in the logfile: the last written line is cut off in the middle. From that I'm judging the script cannot be caught in an endless loop, because that would imply endless logging, which is not happening. (The logfile's size is always 8458 B.)

Do you have any idea what can be going on here? I can send you the script if you'd like to see it. Thanks a lot for any help!

Jan
Mahy - Tue Mar 06 04:07:48 EST 2012

Re: DXL script prematurely ends
Mahy - Tue Mar 06 09:22:59 EST 2012

Don't bother, the issue does not occur anymore. All I had to do was to leave some lines with nasty characters out of the input file. But the behavior still puzzles me, I'd expect some intelligible error message or at least predictable behavior. Instead, I got no info at all (in case of batch run) or GUI client freeze (when run from the GUI client).

Re: DXL script prematurely ends
Mathias Mamsch - Fri Mar 09 11:53:49 EST 2012

Mahy - Tue Mar 06 09:22:59 EST 2012
Don't bother, the issue does not occur anymore. All I had to do was to leave some lines with nasty characters out of the input file. But the behavior still puzzles me, I'd expect some intelligible error message or at least predictable behavior. Instead, I got no info at all (in case of batch run) or GUI client freeze (when run from the GUI client).

My guess would be that your script still has a bug, which will eventually silently crash DOORS. The status of the log file might be incomplete, if you did not call 'flush' persistently. So the "cut off" log file could just be the last automatic flush.

Also DXL is missing an opportunity to free Stream objects (no, closing them does not free them), so if you end up 'appending' to your log file, each time creating another Stream you will get an incredible amount of allocated objects which might slow your DXL program so bad, that it seems to come have to a halt (frozen).

Maybe that helps, regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: DXL script prematurely ends
llandale - Fri Mar 09 13:40:15 EST 2012

Mahy - Tue Mar 06 09:22:59 EST 2012
Don't bother, the issue does not occur anymore. All I had to do was to leave some lines with nasty characters out of the input file. But the behavior still puzzles me, I'd expect some intelligible error message or at least predictable behavior. Instead, I got no info at all (in case of batch run) or GUI client freeze (when run from the GUI client).

Don't know, but I suspect the various "read" commands won't like reading non-ASCII characters, those with a number larger than 256. I wonder if it may work if you read the entire file with "readFile" into a Buffer, then parse the buffer.